let data = Mock.mock({
    "list|10": [
        {
            "id|+1": 1,
            "phone|100000000-999999999": 1,
            "inngroup|+1": ["黑色休闲裤", "浅色袜子", "白色上衣","皮质黑色外套"],
            "data": 2019-05-01,
            "datam|+1": true,
            "status|1": true
        }
    ]
})

function render() {
    let str = ``
    str = data.list.map((item, index) => {
        return `<tr>
                        <td>${item.id}</td>
                        <td>${item.phone}</td>
                        <td>${item.inngroup}</td>
                        <td>${item.data}</td>
                        <td>${item.datam ? `<button style="background-color:green;">完成</button>` : `<button style="background-color:red;">代确认</button>`}</td>
                        <td>${item.datam ? `<div style="width:200px; background-color:green; height: 20px;"></div>` : `<div style="width:${Math.floor(Math.random()*100)+'%'}; height: 20px; background-color:red;"></div>` }</td>
                    </tr>`
    }).join('')
    document.querySelector('tbody').innerHTML = str;
}